package service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import entity.Answer;
import mapper.AnswerMapper;

@Service
public class AnswerService {

	@Resource
	AnswerMapper answerMapper;

	public AnswerMapper getAnswerMapper() {
		return answerMapper;
	}

	public void setAnswerMapper(AnswerMapper answerMapper) {
		this.answerMapper = answerMapper;
	}
	
	public List<Answer> findAnswerById(Answer answer){
		return answerMapper.findAnswerById(answer);
	}
	
	public boolean updateAnswerByQuestionId(Answer answer) {
		return answerMapper.updateAnswerByQuestionId(answer);
	}
}
